<template>
	<navigator class="goods_item" :url="'/pages/goods/goods?id='+goods.id">
		<u-image :src="goods.cover_url" mode="widthFix" height="320rpx" name="cover_url" class="u-skeleton-fillet"></u-image>
		<!-- 骨架图 -->
<!-- 		<u-image class="u-skeleton-fillet" height="300rpx" width="100%" v-show="loading"></u-image>
 -->		<view class="item_title u-line-1 u-skeleton-rect">{{goods.title ? goods.title : "商品标题"}}</view>
		<view class="u-flex u-row-between">
			<view class="item_price u-skeleton-circle">￥{{goods.price ? goods.price : 100}}</view>
			<view class="item_sales u-skeleton-circle">销量: {{goods.sales ? goods.sales :100}}</view>
		</view>
	</navigator>
	

</template>

<script>
	export default {
		name:"goods-card",
		data() {
			return {
				
			};
		},
		props:{
			goods:{
				type:Object,
				default(){
					return{}
				}
			},
			// loading:{
			// 	type:Boolean,
			// 	default:false
			// }
		},
		onLoad() {
			console.log(this.goods.id);
		}
	}
</script>

<style lang="scss" scoped>
	.goods_item{
			margin-top: 10rpx;
			padding: 30rpx;
			box-shadow: rgba(0,0,0,.2) 10rpx 10rpx 20rpx;
			.item_title{
				width: 100%;
				text-align: center;
				font-weight: 750;
				font-size: 35rpx;
				padding-bottom: 10rpx;
				margin-top: 5rpx;
			}
			.item_price{
				color: #ff3377;
				font-size: 30rpx;
			}
			.item_sales{
				font-size: 25rpx;
				color: #888;
			}
		}
</style>
